<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>


  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Django Full Project: Browser — Beanstalk</title>
    <link rel="shortcut icon" 
href="http://mundofacu.beanstalkapp.com/images/favicon.ico" 
type="image/x-icon">
    <link rel="apple-touch-icon" 
href="http://mundofacu.beanstalkapp.com/images/apple-touch-icon.png">
    <link href="models_files/pretty_layout.css" media="screen" 
rel="stylesheet" type="text/css">
    <link href="models_files/print.css" media="print" rel="stylesheet" 
type="text/css">	
    <!--[if IE 7]><link rel="stylesheet" href="/stylesheets/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<!--[if IE 8]><link rel="stylesheet" href="/stylesheets/ie8.css" type="text/css" media="screen, projection" /><![endif]-->
    
    <script src="models_files/prototype_bundle.js" type="text/javascript"></script>
<script src="models_files/jquery_bundle.js" type="text/javascript"></script>
    
  </head><body id="">
    
    
    <div id="container">
      

      
    	<div id="header">        
        <div class="metanav">  
  <p class="meta-global">    
    <a href="http://help.beanstalkapp.com/" class="help" title="Help">Help</a>
    • <a href="http://mundofacu.beanstalkapp.com/" title="">Dashboard</a>
  </p> 

  <p class="meta-personal">
    <em>Marcos Federico Mandrille</em>
    • <a href="http://mundofacu.beanstalkapp.com/profile/edit" title="">My
 Profile</a>
    • <a href="https://mundofacu.beanstalkapp.com/session" onclick="var f
 = document.createElement('form'); f.style.display = 'none'; 
this.parentNode.appendChild(f); f.method = 'POST'; f.action = 
this.href;var m = document.createElement('input'); 
m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); 
m.setAttribute('value', 'delete'); f.appendChild(m);var s = 
document.createElement('input'); s.setAttribute('type', 'hidden'); 
s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', 
'0vxYdF1e8Ihtj4jMR6ZB/+KQ+Zfj+AcsRJjXs3RwtnA='); 
f.appendChild(s);f.submit();return false;" title="Logout">Logout</a>
  </p>
</div>        
        



<div id="title">
  <h1><span class="color-label"><b class="label-orange"></b></span> <strong>Django
 Full Project</strong><i></i></h1>
  
  <div class="dropdown">
		<ul>
		  
		    
		      <li class="single">
		    
			    
      <a href="http://mundofacu.beanstalkapp.com/html" title="Go to 
repository page">
        <span class="color-label"><b class="label-orange"></b></span>
        Django Full Project
      </a>
    
			  </li>
			
			
			
		</ul>
	</div>
</div>


        
          <ul class="mainnav">
  
    <li class="">
<a href="http://mundofacu.beanstalkapp.com/html" title="Activity"><span>Activity</span></a>
</li>


<li class="active">
<a href="http://mundofacu.beanstalkapp.com/html/browse" title="Browse"><span>Browse</span></a>
</li>

<li class="">
<a href="http://mundofacu.beanstalkapp.com/html/releases" 
title="Releases"><span>Releases</span></a>
</li>


  <li class="">
  <a href="http://mundofacu.beanstalkapp.com/html/permissions" 
title="Permissions"><span>Permissions</span></a>
  </li>

  <li class="">
  <a href="http://mundofacu.beanstalkapp.com/repositories/html/edit" 
title="Setup"><span>Setup</span></a>
  </li>


  		 
</ul>
    		
    		<form action="/search" id="searchForm" method="get">
  <fieldset>
    <input class="search-fld passive" id="searchField" name="q" 
size="25" value="Search commits..." type="text">
    <input id="r" name="r" value="html" type="hidden">
    <input value="Go" id="searchBtn" class="search-btn" 
src="models_files/b-search.gif" type="image">
  </fieldset>
</form>
    	</div>
	
    	<div id="page">
        
          
        
    
        
  <div class="page-toolbar" id="page-toolbar">
  <a href="#" class="button  disabled"><span>← Switch to HEAD</span></a>
      

  
    

<form action="/html/diff/path/mundofacu/usuarios/models.py" 
id="compare_with_form" method="get">
  
    <input id="from" name="from" value="6" type="hidden">
  	  
  
	<span class="label">
	  Compare with
	</span>
	
  <select id="revision" name="to"><option selected="selected" value="5">5</option></select>
	<a href="#" onclick="$('compare_with_form').submit()" class="button" 
title="Compare file with selected revision"><span>Compare</span></a>
</form>

  


    <div class="file-revisions">
      <script type="text/javascript">
//<![CDATA[
      Event.observe(window, 'load', function(){
        new Ajax.Request('/html/file_toolbar/mundofacu/usuarios/models.py?rev=6', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('0vxYdF1e8Ihtj4jMR6ZB/+KQ+Zfj+AcsRJjXs3RwtnA=')})
      })

//]]>
</script>
    </div>
    
    <div class="file-actions">
      
  <a 
href="http://mundofacu.beanstalkapp.com/html/live/mundofacu/usuarios/models.py"
 class="button "><span>Preview</span></a>



  <a 
href="http://mundofacu.beanstalkapp.com/html/download/mundofacu/usuarios/models.py"
 class="button "><span>Download latest</span></a>


    </div>
  </div>

    
        <div class="content">
              
          
            
 
  <div id="notifications" class="notification" style="display: none;"></div>
        
            



<div class="browser-path">
  <a href="http://mundofacu.beanstalkapp.com/html/browse?rev=6"><span>~</span><b></b></a><a
 href="http://mundofacu.beanstalkapp.com/html/browse/mundofacu?rev=6"><span>mundofacu</span><b></b></a>
<a 
href="http://mundofacu.beanstalkapp.com/html/browse/mundofacu/usuarios?rev=6"><span>usuarios</span><b></b></a>
</div>

<h1 class="browser-breadcrumbs">
  <strong>models.py</strong>
  
</h1>


<div class="browser-rev">
  <h2 class="rev-number">
  	<span class="rev-number-value">
  	  <a href="http://mundofacu.beanstalkapp.com/html/changesets/6" 
title="See changeset 6">6</a>
  	</span>

    <span class="rev-switcher" id="rev-switcher">
  <a 
href="http://mundofacu.beanstalkapp.com/html/browse/mundofacu/usuarios/models.py?rev=5"
 title="See file contents">←</a>



  <span>→</span>

</span>
  </h2>

  <div class="rev-info-block">
  <p class="rev-comment">Se completo completamente el modelado de la 
base de datos
<br>Se corrigieron algunos errores en la misma
<br>Aplicacion: 'usuarios' lista para comenzar a desarrollar 
formularios.
<br> </p>
  <p class="rev-user">
  <strong><span class="userpic size-medium"><img alt="Marcos Federico 
Mandrille" class="photo" 
src="models_files/656cb6b78f3d0ad7047796f32ded543a.jpeg" height="24" 
width="24"><b></b></span> 
    
      Marcos Federico Mandrille (mandrille)
    
  </strong> at 05:04 AM, 05/18/2010</p>
</div>

</div>


  <table class="highlighttable"><tbody><tr id=""><td class="linenos"><pre>  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127</pre></td><td class="code"><div style="width: 1134px;" 
class="highlight"><pre><a name="code-1"></a><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
<a name="code-2"></a>
<a name="code-3"></a><span class="c"># Crearemos los choices</span>
<a name="code-4"></a><span class="n">tipo_usr</span> <span class="o">=</span> <span class="p">(</span>
<a name="code-5"></a>    <span class="p">(</span><span class="s">u'l'</span><span class="p">,</span> <span class="s">u'Ladron'</span><span class="p">),</span>
<a name="code-6"></a>    <span class="p">(</span><span class="s">u'c'</span><span class="p">,</span> <span class="s">u'Corrector'</span><span class="p">),</span>
<a name="code-7"></a>    <span class="p">(</span><span class="s">u'e'</span><span class="p">,</span> <span class="s">u'Essence Creator'</span><span class="p">),</span>
<a name="code-8"></a>    <span class="p">(</span><span class="s">u'g'</span><span class="p">,</span> <span class="s">u'Guru'</span><span class="p">),</span>
<a name="code-9"></a>    <span class="p">(</span><span class="s">u't'</span><span class="p">,</span> <span class="s">u'Trooper'</span><span class="p">),</span>
<a name="code-10"></a><span class="p">)</span>
<a name="code-11"></a><span class="n">tipo_dato</span> <span class="o">=</span> <span class="p">(</span>
<a name="code-12"></a>    <span class="p">(</span><span class="s">u'n'</span><span class="p">,</span> <span class="s">u'Nombre'</span><span class="p">),</span>
<a name="code-13"></a>    <span class="p">(</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'Apellido'</span><span class="p">),</span>
<a name="code-14"></a>    <span class="p">(</span><span class="s">u'd'</span><span class="p">,</span> <span class="s">u'Direccion'</span><span class="p">),</span>
<a name="code-15"></a>    <span class="p">(</span><span class="s">u'c'</span><span class="p">,</span> <span class="s">u'Estado Civil'</span><span class="p">),</span>
<a name="code-16"></a>    <span class="p">(</span><span class="s">u'g'</span><span class="p">,</span> <span class="s">u'Genero'</span><span class="p">),</span>
<a name="code-17"></a>    <span class="p">(</span><span class="s">u't'</span><span class="p">,</span> <span class="s">u'Telefono'</span><span class="p">),</span>
<a name="code-18"></a>    <span class="p">(</span><span class="s">u'h'</span><span class="p">,</span> <span class="s">u'Hobbies y Descripcion'</span><span class="p">),</span>
<a name="code-19"></a><span class="p">)</span>
<a name="code-20"></a><span class="n">tipo_estado</span> <span class="o">=</span> <span class="p">(</span>
<a name="code-21"></a>    <span class="p">(</span><span class="s">u'a'</span><span class="p">,</span> <span class="s">u'Activo'</span><span class="p">),</span>
<a name="code-22"></a>    <span class="p">(</span><span class="s">u'm'</span><span class="p">,</span> <span class="s">u'Muted'</span><span class="p">),</span>
<a name="code-23"></a>    <span class="p">(</span><span class="s">u's'</span><span class="p">,</span> <span class="s">u'Suspendido'</span><span class="p">),</span>
<a name="code-24"></a>    <span class="p">(</span><span class="s">u'b'</span><span class="p">,</span> <span class="s">u'Banneado'</span><span class="p">),</span>
<a name="code-25"></a><span class="p">)</span>
<a name="code-26"></a>
<a name="code-27"></a><span class="c">#Creamos los modelos de datos</span>
<a name="code-28"></a><span class="k">class</span> <span class="nc">paises</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-29"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-30"></a>  <span class="n">codigo</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-31"></a>
<a name="code-32"></a><span class="k">class</span> <span class="nc">provincias</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-33"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-34"></a>  <span class="n">id_pais</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">paises</span><span class="p">)</span>
<a name="code-35"></a>
<a name="code-36"></a><span class="k">class</span> <span class="nc">localidades</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-37"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-38"></a>  <span class="n">codigo_postal</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">25</span><span class="p">)</span>
<a name="code-39"></a>  <span class="n">id_provincia</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">provincias</span><span class="p">)</span>
<a name="code-40"></a>
<a name="code-41"></a><span class="k">class</span> <span class="nc">universidades</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-42"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-43"></a>  <span class="n">direccion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-44"></a>  <span class="n">contacto</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">EmailField</span><span class="p">(</span><span class="n">primary_key</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-45"></a>  <span class="n">id_localidad</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">localidades</span><span class="p">)</span>
<a name="code-46"></a>
<a name="code-47"></a><span class="k">class</span> <span class="nc">carreras</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-48"></a>  <span class="n">id_carrera</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">IntegerField</span><span class="p">(</span><span class="n">primary_key</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>  
<a name="code-49"></a>  <span class="n">id_universidad</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">universidades</span><span class="p">)</span>
<a name="code-50"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-51"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">100</span><span class="p">)</span>
<a name="code-52"></a>
<a name="code-53"></a><span class="k">class</span> <span class="nc">grupos</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-54"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-55"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">150</span><span class="p">)</span>
<a name="code-56"></a>
<a name="code-57"></a><span class="k">class</span> <span class="nc">usuarios</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-58"></a>  <span class="n">nickname</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">,</span> <span class="n">unique</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-59"></a>  <span class="n">tipo_usuario</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">1</span><span class="p">,</span> <span class="n">choices</span><span class="o">=</span> <span class="n">tipo_usr</span><span class="p">)</span>
<a name="code-60"></a>  <span class="n">hash_pwd</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">30</span><span class="p">)</span>
<a name="code-61"></a>  <span class="n">foto</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">FileField</span><span class="p">(</span><span class="n">upload_to</span><span class="o">=</span><span class="s">"photo"</span><span class="p">)</span>
<a name="code-62"></a>  <span class="n">fecha_registro</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">(</span><span class="n">auto_now</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-63"></a>  <span class="n">fecha_last_login</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">()</span>
<a name="code-64"></a>  <span class="n">fecha_nacimiento</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">(</span><span class="n">null</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<a name="code-65"></a>  <span class="n">localidad</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">localidades</span><span class="p">,</span> <span class="n">null</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-66"></a>  <span class="n">puntaje</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">IntegerField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="mf">0</span><span class="p">)</span>
<a name="code-67"></a>  <span class="n">activo</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<a name="code-68"></a>
<a name="code-69"></a><span class="k">class</span> <span class="nc">tipo_contenidos</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-70"></a>  <span class="n">nombre</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-71"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">200</span><span class="p">)</span>
<a name="code-72"></a>  <span class="n">tratamiento</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">TextField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">1000</span><span class="p">)</span>
<a name="code-73"></a>
<a name="code-74"></a><span class="k">class</span> <span class="nc">contenidos</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-75"></a>  <span class="n">id_usuario</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-76"></a>  <span class="n">titulo</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-77"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">200</span><span class="p">)</span>
<a name="code-78"></a>  <span class="n">id_tipo_contenido</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">tipo_contenidos</span><span class="p">)</span>
<a name="code-79"></a>  <span class="n">fecha_publicacion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">()</span>
<a name="code-80"></a>  <span class="n">fecha_actividad</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">()</span>
<a name="code-81"></a>  <span class="n">puntaje</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">IntegerField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="mf">0</span><span class="p">)</span>
<a name="code-82"></a>  <span class="n">activo</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-83"></a>
<a name="code-84"></a><span class="k">class</span> <span class="nc">amonestaciones</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-85"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-86"></a>  <span class="n">desde</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">()</span>
<a name="code-87"></a>  <span class="n">hasta</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">DateField</span><span class="p">()</span>
<a name="code-88"></a>  <span class="n">estado</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">1</span><span class="p">,</span> <span class="n">choices</span><span class="o">=</span><span class="n">tipo_estado</span><span class="p">)</span>
<a name="code-89"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">150</span><span class="p">)</span>
<a name="code-90"></a>  <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<a name="code-91"></a>    <span class="n">unique_together</span> <span class="o">=</span> <span class="p">[(</span><span class="s">"id_usr"</span><span class="p">,</span><span class="s">"desde"</span><span class="p">,</span><span class="s">"hasta"</span><span class="p">)]</span>
<a name="code-92"></a><span class="k">class</span> <span class="nc">tags</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-93"></a>  <span class="n">descripcion</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">200</span><span class="p">)</span>
<a name="code-94"></a>
<a name="code-95"></a><span class="k">class</span> <span class="nc">mails</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-96"></a>  <span class="n">email</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">EmailField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>    
<a name="code-97"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">,)</span>
<a name="code-98"></a>  <span class="n">mostrar</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<a name="code-99"></a>
<a name="code-100"></a><span class="k">class</span> <span class="nc">slim_string</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-101"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-102"></a>  <span class="n">tipo_dato</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">1</span><span class="p">,</span> <span class="n">choices</span><span class="o">=</span><span class="n">tipo_dato</span><span class="p">)</span>
<a name="code-103"></a>  <span class="n">valor</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mf">50</span><span class="p">)</span>
<a name="code-104"></a>  <span class="n">mostrar</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
<a name="code-105"></a>  <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<a name="code-106"></a>    <span class="n">unique_together</span> <span class="o">=</span> <span class="p">[(</span><span class="s">"id_usr"</span><span class="p">,</span> <span class="s">"tipo_dato"</span><span class="p">,</span> <span class="s">"valor"</span><span class="p">)]</span> 
<a name="code-107"></a>
<a name="code-108"></a><span class="k">class</span> <span class="nc">usuario_carrera</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-109"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-110"></a>  <span class="n">id_carrera</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">carreras</span><span class="p">)</span>
<a name="code-111"></a>  <span class="n">mostrar</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">BooleanField</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<a name="code-112"></a>  <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<a name="code-113"></a>    <span class="n">unique_together</span> <span class="o">=</span> <span class="p">[(</span><span class="s">"id_usr"</span><span class="p">,</span><span class="s">"id_carrera"</span><span class="p">)]</span>
<a name="code-114"></a>
<a name="code-115"></a><span class="k">class</span> <span class="nc">usuario_grupo</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-116"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-117"></a>  <span class="n">id_grupo</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">grupos</span><span class="p">)</span>
<a name="code-118"></a>  <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<a name="code-119"></a>    <span class="n">unique_together</span> <span class="o">=</span> <span class="p">[(</span><span class="s">"id_usr"</span><span class="p">,</span> <span class="s">"id_grupo"</span><span class="p">)]</span>
<a name="code-120"></a>
<a name="code-121"></a><span class="k">class</span> <span class="nc">usuario_tag</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-122"></a>  <span class="n">id_usr</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">usuarios</span><span class="p">)</span>
<a name="code-123"></a>  <span class="n">id_tag</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">tags</span><span class="p">)</span>
<a name="code-124"></a>
<a name="code-125"></a><span class="k">class</span> <span class="nc">contenido_tag</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
<a name="code-126"></a>  <span class="n">id_contenido</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">contenidos</span><span class="p">)</span>
<a name="code-127"></a>  <span class="n">id_tag</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">tags</span><span class="p">)</span>
</pre></div>
</td></tr></tbody></table>


        
          
        </div>
      </div>

      <div id="footer">
        <div class="wildbit">
  <a class="beanstalk-logo" href="http://beanstalkapp.com/" 
title="Beanstalk &nbsp; version control for team leads">&nbsp;</a>
  <p class="vcard">© 2010, <a href="http://www.wildbit.com/" class="fn 
org url">Wildbit LLC</a>. All rights reserved.</p>
  <p>
    <a href="http://blog.beanstalkapp.com/">Blog</a> <span class="sep">•</span>
 
    <a href="http://twitter.com/beanstalkapp">Twitter</a> <span 
class="sep">•</span>
    <a href="http://beanstalkapp.com/privacy-policy">Privacy Policy</a> <span
 class="sep">•</span> 
    <a href="http://beanstalkapp.com/terms-of-service">Terms of Use</a>
  </p>
</div>    
      </div>

    </div>
    
      
  </body></html>
